#if !defined(AFX_DLGACCELERATOR_H__08DA50CC_03F6_4E47_8992_AC095A88C264__INCLUDED_)
#define AFX_DLGACCELERATOR_H__08DA50CC_03F6_4E47_8992_AC095A88C264__INCLUDED_

#include "HeaderEx.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgAccelerator.h : header file
//
#include "MyHotKeyCtrl.h"
#include "HotKeyListCtrl.h"

/////////////////////////////////////////////////////////////////////////////
// CDlgAccelerator dialog

class CDlgAccelerator : public CDialog
{
// Construction
public:
	typedef struct tagSortInfo
	{
		CListCtrl *plist;
		CHeaderEx *pheader;
	} SortInfo;

	CDlgAccelerator(CWnd* pParent = NULL);   // standard constructor
	~CDlgAccelerator();

// Dialog Data
	//{{AFX_DATA(CDlgAccelerator)
	enum { IDD = IDD_ACCELERATOR };
	CMyHotKeyCtrl m_hotkey;
	CHotKeyListCtrl	m_list;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDlgAccelerator)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	CStringArray m_arrCategory;
	CFont m_font;
	BOOL m_bModified;
	BYTE HotKeyToAccel(WORD wModifiers);
	WORD AccelToHotKey(BYTE fVirst);
	void FillList();
	CHeaderEx m_header;
	CommandInfo *mCommands;
	BOOL GetCommandText(int nIndex, CString *psCategory = NULL, CString* psName = NULL, CString* psDesc = NULL);

	// Generated message map functions
	//{{AFX_MSG(CDlgAccelerator)
	virtual BOOL OnInitDialog();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnClickList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDblClkList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDestroy();
	virtual void OnCancel();
	afx_msg void OnOk();
	afx_msg void OnReset();
	afx_msg void OnColumnClickList(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	afx_msg void OnHotkey();

	static int CALLBACK compare (LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);

	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLGACCELERATOR_H__08DA50CC_03F6_4E47_8992_AC095A88C264__INCLUDED_)
